import { defineStore } from "pinia";
import { reactive } from "vue";

export const usePostStore = defineStore('post', {
    state: () => ({
        //初始化空列表
        valueHtml: '',
        upload: false
    }),
    getters: {
        getItem: (state) => {
            return state.valueHtml
        }

    },
    actions: {
        setPost(text, id) {
            this.valueHtml= text
            this.upload = true
        },
        changeUpload(upload=false){
            this.upload = upload
        }
    }

})